﻿
using System;

namespace ModuleA.ViewModels
{
    public class ViewAViewModel: BindableBase, INavigationAware
    {
		private string title;

		public string Title
        {
			get { return title; }
			set 
			{ 
				title = value;
				RaisePropertyChanged(); 
			}
		}

        bool IRegionAware.IsNavigationTarget(NavigationContext navigationContext)
        {
            return true;
        }

        void IRegionAware.OnNavigatedFrom(NavigationContext navigationContext)
        {
           
        }

        void IRegionAware.OnNavigatedTo(NavigationContext navigationContext)
        {
            if (navigationContext.Parameters.ContainsKey("title")) 
            { 
                this.Title = navigationContext.Parameters.GetValue<string>("title");
            }
        }
    }

}